/**
 *
 * 游戏场景
 *
 */
class MainUIView extends egret.DisplayObjectContainer {

    //构造函数
    public constructor() {
        super();
		this.initView();
		this.addEvent();
    }
	
    private _goldTxt: egret.TextField;
    private addEvent(): void {
		Global.addEventListener(Events.GlobalGold, this.GlobalGoldHandle, this);
    }
        
    private removeEvent(): void {
    }

    private initView() {
		this._goldTxt = CreateObject.createTextField(180, 25, "", 120, 33, 14, 0xFFFFFF, "微软雅黑" ,"center");
		this.addChild(this._goldTxt);
		this._goldTxt.text = "0";
    }
	
    private GlobalGoldHandle(): void {
		this._goldTxt.text = GameManager.i.gold.toString();
    }
	
    
	
}